
class SystemRole < ActiveRecord::Base
	include AliasingColumns
        
	set_table_name "SYSTEM_ROLES"        
	AliasingColumns.add_aliases columns	

	has_many :users,
			 :class_name => "User",
			 :foreign_key => "role_id"
	
		
	if  AliasingColumns.get_adapter_name == "oracle"
#		self.primary_key ="ID"	
		set_sequence_name table_name()<<"_SEQ" 
	#	before_create :set_id
		def set_id
			 self.ID =connection.next_sequence_value(self.class.sequence_name)	
		end 
	end
	
end
